package com.example.fwcz.service.impl;

import com.example.fwcz.entity.*;
import com.example.fwcz.mapper.HouseMapper;
import com.example.fwcz.service.HouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HouseServiceImpl implements HouseService {
    @Autowired
    HouseMapper houseMapper;

    @Override
    public void addHouse(houseInfo houseInfo){
        houseMapper.addHouse(houseInfo);
    }
    @Override
    public void deleteHouse(int id){
        houseMapper.deleteHouse(id);
    }
    @Override
    public void changeHouse(houseInfo houseInfo){
        houseMapper.changeHouse(houseInfo);
    }
    @Override
    public List<houseInfo> searchAllhouse(){
        return houseMapper.searchAllhouse();
    }
    @Override
    public List<houseInfo> searchLandlordhouse(String landlord_id){
        return houseMapper.searchLandlordhouse(landlord_id);
    }
    @Override
    public List<houseInfo> searchUserhouse(String user_id){
        return houseMapper.searchUserhouse(user_id);
    }
    @Override
    public houseInfo searchOnehouse(String id){
        return houseMapper.searchOnehouse(id);
    }
}
